class Bond < ActiveRecord::Base
  default_scope :order => 'number'

  validates :nominal, :number, :presence => true
  validates :nominal, :numericality => {:equal_to => 1, :equal_to => 2}
  validates :image_url, :format => { :allow_blank => true, :with => %r{\.(gif|jpg|jpeg|png)$}i, :message => 'must be a URL for GIF, JPG or PNG image'}
end
